package com.youjiang.dao.util;


import com.youjiang.dao.entity.Subject;
import com.youjiang.dao.impl.SubjectDaoImpl;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by yujia on 2017/11/15.
 */
public class DaoMain {
    public static void main(String[] args) {
        ApplicationContext context =
                new ClassPathXmlApplicationContext("classpath*:mybatis/mybatis-conf.xml");
//        Subjectimpl subjectimpl = (Subjectimpl)context.getBean("studentDaoImp");
//        List<Subject> subject = subjectimpl.allsubjects();
        // subjectimpl.addSubject("一级科目");
//        subjectimpl.getSubjectL1();
        SubjectDaoImpl subjectDaoImpl = (SubjectDaoImpl)context.getBean("subjectDaoImpl");
        Subject subject = subjectDaoImpl.query();

//        return gson.toJson(subject);
//        subjectDao.insert();
//        subjectDao.query();
    }

}